import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const timestamp = 'user_timer_token'

// 获取cookie中的token的时间搓
export function getTokenTimer() {
  return Cookies.get(timestamp)
}

// 将token的时间搓保存到cookie中
export function setTokenTimer(timer) {
  return Cookies.set(timestamp, timer)
}
// 获取cookie中的token
export function getToken() {
  return Cookies.get(TokenKey)
}

// 将token保存到cookie中
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

// 删除cookie中的token
export function removeToken() {
  return Cookies.remove(TokenKey)
}
